<!DOCTYPE html>
<html lang="en">
<head>
    <!-- TODO: Move  js and css as the first children of head -->
    {{css "css/custom.css"}}
    <title>{{#placeholder "title"}}{{/placeholder}}</title>
    <meta charset="UTF-8">
    <meta name="description" content="WSO2 API Manager"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <script >
        var token = getCookie("WSO2_AM_TOKEN_1");
        var request_path =  window.location.pathname.split('/');
        if(!request_path.includes('editor') && !token) {
            window.location = "{{@config.loginPageUri}}";
        }
        function getCookie(name) {
            var value = "; " + document.cookie;
            var parts = value.split("; " + name + "=");
            if (parts.length == 2) return parts.pop().split(";").shift();
        }
    </script>
    <!-- Le fav and touch icons -->
    {{#placeholder "favicon"}}
        <link rel="shortcut icon" href="{{public "images/default-favicon.png"}}" type="image/png"/>
    {{/placeholder}}
    {{fragment "swaggerjs"}} <!-- TODO: request to maintain swaggerjs library from common.foundation component ~tmkb-->
    {{fragment "handlebarsjs"}}
    <!-- TODO: request to maintain handlebarsjs library from common.foundation component ~tmkb-->
    {{fragment "org.wso2.carbon.uuf.common.foundation.ui.uuf-client"}}
    {{fragment "org.wso2.carbon.uuf.common.foundation.ui.noty"}}
    {{fragment "org.wso2.carbon.apimgt.publisher.commons.ui.api-client-js"}}
    {{fragment "org.wso2.carbon.uuf.common.foundation.ui.select2" }}
    {{placeholder "css"}}
    {{placeholder "headJs"}}
    {{placeholder "headOther"}}
</head>
<body class="sticky-footer ">
<!-- TODO: load all the fragments into libraries zone from component.yaml
Remove handlebarjs lib
-->
{{defineZone "libraries"}}
<!-- header -->
{{defineZone "topbar"}}
<!-- End header -->

<!--Breadcumb -->
<div class="breadcrumb-wrapper">
    <ol class="breadcrumb">
        <li>
            <a href="{{@contextPath}}/" title="Home" ><i
                    class="icon fw fw-home"></i> <span class="hidden-xs">Home</span></a>
        </li>
        <li class="active">
            <a href="{{@contextPath}}/apis" title="API List">APIs</a>
        </li>
    </ol>
</div>
<!--End Breadcumb -->

<!-- #page-content-wrapper -->
<div class="page-content-wrapper">
    <div class="navbar-wrapper">
        <nav class="navbar navbar-default" data-spy="affix"
             data-offset-top="80" data-offset-bottom="40">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed"
                            data-toggle="collapse" data-target="#navbar" aria-expanded="false"
                            aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span> <span
                            class="icon-bar"></span> <span class="icon-bar"></span> <span
                            class="icon-bar"></span>
                    </button>
                    <a class="navbar-menu-toggle collapsed hidden"
                       data-toggle="collapse" data-target="#navbar2" aria-expanded="false"
                       aria-controls="navbar2" title="navigator bar"> <span class="icon fw-stack"> <i
                            class="fw fw-tiles fw-stack-1x toggle-icon-up"></i>
					</span>

                    </a>
                    <a class="navbar-menu-toggle" data-toggle="sidebar" data-target="#left-sidebar"
                       aria-expanded="false" rel="leftmenu-sidebar">
                    <span class="icon fw-stack">
                        <i class="fw fw-menu fw-stack-1x toggle-icon-left-arrow"></i>
                    </span>
                    </a>
                </div>

                <!-- Actions Menu -->
                {{defineZone "actionMenu"}}
                <!-- End Actions Menu -->
            </div>
        </nav>
    </div>

    {{defineZone "secondaryMenu"}}

    <!-- page content -->
    <div class="container-fluid">
        <div class="body-wrapper" id="bodyWrapper">
            <!-- TODO: remove custom notification styles with addition of http://ned.im/noty/ to uuf-foundation-fragment ~tmkb-->
            <div id="general-alerts">
                <div class="alert alert-success" role="alert">
                    <div class="alert-message">
                    </div>
                    <button type="button" class="close" aria-label="close" data-dismiss="alert">
                    <span aria-hidden="true">
                        <i class="fw fw-cancel"></i>
                    </span>
                    </button>
                </div>

                <div class="alert alert-info" role="alert">
                    <div class="alert-message">
                    </div>
                    <button type="button" class="close" aria-label="close" data-dismiss="alert">
                    <span aria-hidden="true">
                        <i class="fw fw-cancel"></i>
                    </span>
                    </button>
                </div>

                <div class="alert alert-warning" role="alert">
                    <div class="alert-message">
                    </div>
                    <button type="button" class="close" aria-label="close" data-dismiss="alert">
                    <span aria-hidden="true">
                        <i class="fw fw-cancel"></i>
                    </span>
                    </button>
                </div>

                <div class="alert alert-danger" role="alert">
                    <div class="alert-message">
                    </div>
                    <button type="button" class="close" aria-label="close" data-dismiss="alert">
                    <span aria-hidden="true">
                        <i class="fw fw-cancel"></i>
                    </span>
                    </button>
                </div>
            </div>
            {{defineZone "content"}}
        </div>
    </div>
</div>
<!-- /#wrapper -->

<footer class="footer">
    <div class="container-fluid">
        {{defineZone "footer"}}
    </div>
</footer>
{{placeholder "js"}}
</body>
</html>

